<!DOCTYPE html>
<html lang="zh-CN">
	<head>
	  <meta charset="utf-8">
	  <meta name="viewport" content="width=device-width, initial-scale=1.0">
	  <meta name="description" content="Geeker">
	  <meta name="author" content="liutao">
	  <meta name="keyword" content="Geeker">
	  <title>Geeker私塾后台管理页面</title>

	  <!-- Favicons -->
	  <link href="__IMG__/images/favicon.png" rel="icon">
	  <link href="__IMG__/images/apple-touch-icon.png" rel="apple-touch-icon">

	  <!-- Bootstrap core CSS -->
	  <link href="__PUBLIC__/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	  <!--external css-->
	  <link href="__PUBLIC__/lib/font-awesome/css/font-awesome.css" rel="stylesheet" />
	  <!-- Custom styles for this template -->
	  <link href="__PUBLIC__/css/style.css" rel="stylesheet">
	  <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet">
	</head>

	<body>
	  <section id="container">
		<!--header start-->
		{include file="common/header"}
		<!--header end-->
		
		<!--sidebar start-->
		{include file="common/sidebar"}
		<!--sidebar end -->
		
		
		<!--main content start-->
		<section id="main-content">
		  <section class="wrapper site-min-height">
			<!-- row -->
			<p class="nav-size mt">
			  <i class="fa fa-home"></i>&nbsp;
			  <a href="{:url('index/index')}">系统</a> / 链接列表
			</p>
			<div class="row mt">
			  <div class="col-md-12">
				<div class="content-panel">
				  <table class="table table-striped table-advance table-hover">
					<a href="{:url('add')}">
					  <button type="button" class="btn btn-theme add_margin">
						<i class="fa fa-plus"></i> &nbsp;Add
					  </button>
					</a>
					<hr>
					<thead>
					  <tr>
						<th class="text-center" width="10%"></i> ID</th>
						<th class="text-center" width="18%"></i> 链接名称</th>
						<th class="text-center" width="18%"></i> 链接地址</th>
						<th class="text-center" width="18%"></i> 链接描述</th>
						<th class="text-center" width="23%">操作</th>
					  </tr>
					</thead>
					
					
					<tbody>
					  {volist name="list" id="vo"}
					  <tr class="text-center">
						<td>{$vo.id}</td>
						<td>{$vo.title}</td>
						<td><a href="{$vo.url}" target="_blank">{$vo.url}</a></td>
						<td>{$vo.desc}</td>

						<td>
						  <a href="{:url('edit',array('id'=>$vo['id']))}">
							<button class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></button>
						  </a>
						  <button class="btn btn-danger btn-xs" data-toggle="modal" data-target="#{$vo.id}"><i class="fa fa-trash-o "></i></button>
						  
						  <!-- Modal strat -->
						  <div class="modal fade" id="{$vo.id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						    <div class="modal-dialog">
						      <div class="modal-content">
						        <div class="modal-header">
						          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						          <h4 class="modal-title" id="myModalLabel">确认要删除吗？</h4>
						        </div>
						        <h3>
						          <button type="button" class="btn btn-default" data-dismiss="modal">关闭 </button>
								  &nbsp;&nbsp;
								  <a href="{:url('link/del',array('id'=>$vo['id']))}">
						            <button type="button" class="btn btn-primary text-center"> 删除</button>
								  </a>
						        </h3>
						      </div>
						    </div>
						  </div>
						  <!-- Modal end -->
						</td>
						
						

						
						
						
						
					  </tr>	
					  {/volist}
					</tbody>
				  </table>
				  <div class="text-right" style="margin-right: 20px;">
				  {$list->render()}
				  </div>
				</div>
				<!-- /content-panel -->
			  </div>
			  <!-- /col-md-12 -->
			</div>
			<!-- /row -->
		  </section>
		</section>
		<!-- /MAIN CONTENT -->
		<!--main content end-->
		

		
		<!--footer start-->
		{include file="common/footer"}
		<!--footer end-->
	  </section>
	  
	  <!-- js placed at the end of the document so the pages load faster -->
	  <script src="__PUBLIC__/lib/jquery/jquery.min.js"></script>
	  <script src="__PUBLIC__/lib/bootstrap/js/bootstrap.min.js"></script>
	  <script class="include" type="text/javascript" src="__PUBLIC__/lib/jquery.dcjqaccordion.2.7.js"></script>
	  <script src="__PUBLIC__/lib/jquery.scrollTo.min.js"></script>
	  <script src="__PUBLIC__/lib/jquery.nicescroll.js" type="text/javascript"></script>
	  <!--common script for all pages-->
	  <script src="__PUBLIC__/lib/common-scripts.js"></script>
	  <!--script for this page-->
	</body>
</html>
